using DaoHang.Models;

namespace DaoHang.Services
{
    /// <summary>
    /// 数据导出服务接口
    /// </summary>
    public interface IDataExportService
    {
        /// <summary>
        /// 导出所有数据为JSON格式
        /// </summary>
        /// <returns>JSON字符串</returns>
        Task<string> ExportAllDataAsync();

        /// <summary>
        /// 导出网站数据
        /// </summary>
        /// <returns>网站数据列表</returns>
        Task<List<WebsiteExportData>> ExportWebsitesAsync();

        /// <summary>
        /// 导出分类数据
        /// </summary>
        /// <returns>分类数据列表</returns>
        Task<List<CategoryExportData>> ExportCategoriesAsync();

        /// <summary>
        /// 导出站点设置数据
        /// </summary>
        /// <returns>站点设置数据</returns>
        Task<SiteSettingsExportData?> ExportSiteSettingsAsync();

        /// <summary>
        /// 导出AI配置数据
        /// </summary>
        /// <returns>AI配置数据列表</returns>
        Task<List<AIConfigExportData>> ExportAIConfigsAsync();

        /// <summary>
        /// 从JSON导入数据
        /// </summary>
        /// <param name="jsonData">JSON数据</param>
        /// <param name="overwriteExisting">是否覆盖现有数据</param>
        /// <returns>导入结果</returns>
        Task<(bool success, string message, int importedCount)> ImportDataFromJsonAsync(string jsonData, bool overwriteExisting = false);

        /// <summary>
        /// 验证导入数据格式
        /// </summary>
        /// <param name="jsonData">JSON数据</param>
        /// <returns>验证结果</returns>
        Task<(bool isValid, string message, DataExportModel? data)> ValidateImportDataAsync(string jsonData);

        /// <summary>
        /// 获取导出数据统计
        /// </summary>
        /// <returns>数据统计</returns>
        Task<Dictionary<string, int>> GetExportStatisticsAsync();
    }
} 